package com.cc.user.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

@ApiModel("订单项")
public class OrderItem {
    /**
     * 订单id
     * 考虑去掉
     */
    @ApiModelProperty("订单id")
    private Long orderId;
    /**
     * 是否选中
     */
    @ApiModelProperty("是否选中")
    private Boolean check = true;

    /**
     * 大标题
     */
    @ApiModelProperty("商品名称")
    private String productName;
    /**
     * 商品详情单价
     */
    @ApiModelProperty("商品详情单价")
    private BigDecimal productPrice;
    /**
     * 商品详情规格
     */
    @ApiModelProperty("商品详情规格")
    private String productSize;
    /**
     * 默认照片src
     */
    @ApiModelProperty("默认照片")
    private String defaultPicture;
    /**
     * 商品详情数量
     */
    @ApiModelProperty("商品详情数量")
    private Integer count;
    /**
     * 商品详情总价
     */
    @ApiModelProperty("商品详情总价")
    private BigDecimal totalPrice;

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getProductName() {
        return productName;
    }

    public Boolean getCheck() {
        return check;
    }

    public void setCheck(Boolean check) {
        this.check = check;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public BigDecimal getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(BigDecimal productPrice) {
        this.productPrice = productPrice;
    }

    public String getProductSize() {
        return productSize;
    }

    public void setProductSize(String productSize) {
        this.productSize = productSize;
    }

    public String getDefaultPicture() {
        return defaultPicture;
    }

    public void setDefaultPicture(String defaultPicture) {
        this.defaultPicture = defaultPicture;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public BigDecimal getTotalPrice() {
        /*if(this.productPrice == null) return new BigDecimal("0");
        return this.productPrice.multiply(new BigDecimal(""+this.count));*/
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }
}
